﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using Stackoverflow.Core.Comments;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.AspNet.Identity.EntityFramework;

namespace Stackoverflow.Core.Base
{
    public abstract class Entity
    {
        [Key]
        public Guid Id { get; set; }

        public DateTime? CreatedDate { get; set; }

        public DateTime? UpdatedDate { get; set; }

        public string UserId { get; set; }

        public string Content { get; set; }

        [ForeignKey("UserId")]
        public virtual IdentityUser User { get; set; }
    }

    public abstract class MappingComment : Entity
    {
        public List<Comment> Comments { get; set; }
        
        public int Vote { get; set; }
    }
}
